package collect

import (
	"github.com/gin-gonic/gin"
	taskCcontrollers "huijing_mall/api/collect"
	"huijing_mall/api/middleware"
)

// 任务
func RouterCollect(r *gin.Engine) {
	authGroup := r.Group("/auth", middleware.AuthMiddleware())
	{
		//获取数据
		authGroup.POST("/get/city/data", taskCcontrollers.GetAreaData)
		//获取数据 （api 爬）
		authGroup.POST("/api/v1/city_work", taskCcontrollers.GetCityData)
		//删除数据
		authGroup.POST("/delete/api/brand_name/data", taskCcontrollers.DelBrandData)
		//查询任务
		authGroup.POST("/query/task/api", taskCcontrollers.QueryTask)
		//创建任务
		authGroup.POST("/creat/task/api", taskCcontrollers.GetCityData)
		//设置优先级
		authGroup.POST("/update/score/api", taskCcontrollers.SetScore)
		//获取任务
		authGroup.POST("/get/task/api", taskCcontrollers.GetTask)
		//结束任务
		authGroup.POST("/end/task/api", taskCcontrollers.EndTask)
		//任务回调
		authGroup.POST("/notify/task/api", taskCcontrollers.Notify)
		//添加地区 code
		authGroup.GET("/insert/area", taskCcontrollers.InsertArea)
	}
}
